// import Home from '../pages/Home'
// import Login from '../pages/Login'
// import Register from '../pages/Register'
// import Search from '../pages/Search'
// import Detail from '@/pages/Detail'
// import AddCartSuccess from '@/pages/AddCartSuccess'
// import ShopCart from '@/pages/ShopCart'
// import Trade from '@/pages/Trade'
// import Center from '@/pages/Center'
// import PaySuccess from '@/pages/PaySuccess'
// import Pay from '@/pages/Pay'

const Home = () => import('@/pages/Home')
const Search = () => import('@/pages/Search')
const Login = () => import('@/pages/Login')
const Register = () => import('@/pages/Register')
const Detail = () => import('@/pages/Detail')
const ShopCart = () => import('@/pages/ShopCart')
const AddCartSuccess = () => import('@/pages/AddCartSuccess')
const Trade = () => import('@/pages/Trade')
const Pay = () => import('@/pages/Pay')
const PaySuccess = () => import('@/pages/PaySuccess')
const Center = () => import('@/pages/Center')

export default [
  {
    name: 'trade',
    path: '/trade',
    component: Trade,
  },
  {
    name: 'center',
    path: '/center',
    component: Center,
  },
  {
    name: 'paysuccess',
    path: '/paysuccess',
    component: PaySuccess,
  },
  {
    name: 'pay',
    path: '/pay',
    component: Pay,
  },
  {
    name: 'shopcart',
    path: '/shopcart',
    component: ShopCart,
  },
  {
    name: 'addcartsuccess',
    path: '/addCartSuccess',
    component: AddCartSuccess,
  },
  {
    name: 'home',
    path: '/home',
    component: Home,
    meta: { isShowNav: true },
  },
  {
    name: 'login',
    path: '/login',
    component: Login,
    meta: {
      isHiddenFooter: true,
    },
  },
  {
    name: 'register',
    path: '/register',
    component: Register,
    meta: {
      isHiddenFooter: true,
    },
  },
  {
    name: 'search',
    path: '/search/:keyword?',
    component: Search,
  },
  {
    name: 'detail',
    path: '/detail/:id',
    component: Detail,
    props: true, // 加了这个属性之后， 就可以让当前的params参数在组件当中来使用 前提是先用props来接收一下
  },
  {
    path: '/',
    redirect: '/home',
  },
]
